package com.zhongxi.guoyuan.view.rewardCoin;

import android.util.SparseArray;

import com.zhongxi.guoyuan.base.BaseFragment;

/**
 * Created by Administrator on 2017/10/14.
 */

public class FragmentFactory {

    static SparseArray<BaseFragment> fragmentMap = new SparseArray<>();

    public static BaseFragment create(int position, String id, String trim) {
        BaseFragment fragment = fragmentMap.get(position);
//        if (fragment == null) {
//            switch (position) {
//                case 0:
//                    fragment = new AllMFragment(titleList.get(position).getId(), trim);
//                    break;
//                case 1:
//                    fragment = new HMFragment();
//                    break;
//                case 2:
//                    fragment = new TwoMFragment();
//                    break;
//                case 3:
//                    fragment = new OneMFragment();
//                    break;
//            }
//            if (fragment != null) {
//                fragmentMap.put(position, fragment);
//            }
//        }
//        Bundle args = new Bundle();
//        args.putString("id", id);
//        args.putString("trim", trim);
//        fragment.setArguments(args);
        return null;
    }
}
